package com.feiwo.nonego.rpc.consumer.common.initializer;

import com.feiwo.nonego.rpc.codec.RpcDecoder;
import com.feiwo.nonego.rpc.codec.RpcEncoder;
import com.feiwo.nonego.rpc.consumer.common.handler.RpcConsumerHandler;
import io.netty.channel.ChannelInitializer;
import io.netty.channel.socket.SocketChannel;

/**
 *
 *
 * @author feiwo 2025-08-08
 */
public class RpcConsumerInitializer extends ChannelInitializer<SocketChannel> {
    @Override
    protected void initChannel(SocketChannel ch) throws Exception {
        var cp = ch.pipeline();
        cp.addLast(new RpcEncoder());
        cp.addLast(new RpcDecoder());
        cp.addLast(new RpcConsumerHandler());
    }
}
